package com.ruili.framework.controller;

public class ResponseInfo {

    private String code;

    private String msg;

    private Object data;

    public Object getData() {
        return data;
    }

    public ResponseInfo setData(Object data) {
        this.data = data;
        return this;
    }

    public String getCode() {
        return code;
    }

    public ResponseInfo code(String code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public ResponseInfo msg(String msg) {
        this.msg = msg;
        return this;
    }

    public static ResponseInfo setResponseEnumAndGet(ResponseEnum responseEnum){
        ResponseInfo responseInfo = new ResponseInfo();
        return responseInfo.code(responseEnum.getCode()).msg(responseEnum.getMsg());
    }
}
